<%@ page import="com.zs.dao.AdminDao" %>
<%@ page import="com.zs.entity.Admin" %><%--
  Created by IntelliJ IDEA.
  User: 悠乐美
  Date: 2024/1/11
  Time: 10:52
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    String aname = request.getParameter("aname");
    String apwd = request.getParameter("apwd");

    AdminDao adminDao = new AdminDao();
    Admin admin = adminDao.adminLogin(aname, apwd);

    if (admin != null) {
        //将管理员对象存入session(会话)
        session.setAttribute("admin", admin);
        response.sendRedirect("main.jsp");
    }

%>
</body>
</html>
